package org.ipb.controller.users;

import java.util.ArrayList;
import java.util.List;

import util.menu.SubMenu;

import com.opensymphony.xwork2.ActionSupport;

public class SuAction extends ActionSupport {

	private List<SubMenu> listSubMenu;
	private boolean subMenu;
	private String nav;
	private static final long serialVersionUID = 3107220959703009022L;

	public String execute() {
		return SUCCESS;
	}

	public String home() {
		subMenu = false;
		return SUCCESS;
	}

	public String user() {
		subMenu = true;
		listSubMenu = new ArrayList<SubMenu>();
		setNav("Admin > Manage Menu");
		SubMenu s1 = new SubMenu("Kelompok Pengguna", "modul/kelompokpengguna");
		SubMenu s2 = new SubMenu("Pengguna", "modul/penggunasistem");
		listSubMenu.add(s1);
		listSubMenu.add(s2);
		return SUCCESS;
	}

	public boolean isSubMenu() {
		return subMenu;
	}

	public void setSubMenu(boolean subMenu) {
		this.subMenu = subMenu;
	}

	public String getNav() {
		return nav;
	}

	public void setNav(String nav) {
		this.nav = nav;
	}

	public List<SubMenu> getListSubMenu() {
		return listSubMenu;
	}

	public void setListSubMenu(List<SubMenu> listSubMenu) {
		this.listSubMenu = listSubMenu;
	}

}
